<?php

class FMessage extends FWidget
{
    
    const MESSAGE_TYPE = 'fmessage';
    const MESSAGE_TYPE_SUCCESS = 'fmessagesuccess';
    const MESSAGE_TYPE_ERROR = 'fmessageerror';
    const MESSAGE_TYPE_ALERT = 'fmessagealert';
    
    public function __construct($msg, $title = 'Info', $xtype = FMessage::MESSAGE_TYPE)
    {
        parent::__construct('fmessage_' . rand(), $xtype);
        $this->setTitle($title);
        $this->setMsg($msg);
    }
    
}

?>
